<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>{{ $post->title  }}</title>
</head>
<body>
    <h3>{{ $post->title }}</h3>
    <p>
        <span>{{ $post->user_name  }}</span>
        <span>{{ $post->created_at  }}</span>
    </p>
    <div>
        {{ $post->content  }}
    </div>

    <hr/>
        <div>
            <ul>
                <li>
                    <div></div>
                </li>
            </ul>
        </div>
    <hr/>

    <div>
        <form action="{{ route('comment.store')  }}" method="post">
            {{ csrf_field()  }}
            <input type="hidden" name="post_id" value="{{ $post->id  }}">
            <p>
                <textarea name="content" id="" cols="30" rows="10"></textarea>
            </p>
            @if($errors->has('content'))
                <p>{{ $errors->first('content')  }}</p>
            @endif
            <p>
                <input type="submit" value="回复">
            </p>
        </form>
    </div>
</body>
</html>
